package com.example.wujinapi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.wujinapi.entity.Products;
import com.example.wujinapi.entity.Users;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

/**
 * (Products)表服务接口
 *
 * @author makejava
 * @since 2023-07-10 22:08:37
 */
public interface ProductsService extends IService<Products> {
    void addProduct(Products products);
    void updateProduct(Products products);
    void deleteProduct(int productId);
    int getAllProductsTotals();
    Products getProductById(int id);
    List<Products> searchProducts(String keyWord);
    @MapKey("id")
    List<Map<String,Object>> getProducts(int pageNum, int pageSize);
}

